home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Q-R / QuickTurtle.cpt / QuickTurtle / QuickTurtle.rsrc / STR#_102.txt < prev    next >
Encoding:
Text File  |  1991-06-27  |  1.5 KB  |  59 lines

  1. The heading function takes no parameters.  The ‚Äúthe‚Äù is optional. It returns the current heading in degrees.  Example:
  2.  
  3.   put the heading into oldHeading
  4.   <do something>
  5.   set heading oldHeading.
  6.  
  7. The position function can only be used in a put command:
  8.  
  9.   put [the] position into <x,y>
  10.  
  11. where x & y are variables.  It returns the current pen coordinates.
  12.  
  13. The random function returns a random integer within the ¬± range of its parameter.  Thus
  14.  
  15.   random(100)
  16.  
  17. returns anything from -99 to +99 inclusive.  The maximum parameter is 32767.
  18.  
  19. The round function rounds its parameter to the nearest integer.  Round(0.5) is rounded up to 1.
  20.  
  21. The trunc function truncates its parameter, i.e., removes any fractional value.  Example:
  22.  
  23.      trunc(1.9) = 1
  24.  
  25. The abs function forces the sign of its parameter to positive.  Thus abs(-1) = 1.  This can be used with random to get a positive range of values:
  26.  
  27.   abs(random(100))
  28.  
  29. returns values 0..99.
  30.  
  31. The sin function returns the sine of its parameter:
  32.  
  33.   sin(param)
  34.  
  35. The parameter represents degrees.
  36.  
  37. The cos function returns the cosine of its parameter:
  38.  
  39.   cos(param)
  40.  
  41. The parameter represents degrees.
  42.  
  43. The tan function returns the tangent of its parameter:
  44.  
  45.   tan(param)
  46.  
  47. The parameter represents degrees.
  48.  
  49. The arcTan function returns the arctangent of its parameter.  This is the inverse of the tangent function:
  50.  
  51.      arctan(tan(n)) = n
  52.  
  53. The sqrt function returns the square root of its parameter:
  54.  
  55.   sqrt(param).
  56.  
  57. Negative parameters are illegal.
  58.  
  59.